3.40 \(\int \frac{(d+e x)^2}{x^3 \sqrt{d^2-e^2 x^2}} \, dx\)

Optimal. Leaf size=80 \[ -\frac{2 e \sqrt{d^2-e^2 x^2}}{d x}-\frac{\sqrt{d^2-e^2 x^2}}{2 x^2}-\frac{3 e^2 \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )}{2 d} \]

[Out]

-Sqrt[d^2 - e^2*x^2]/(2*x^2) - (2*e*Sqrt[d^2 - e^2*x^2])/(d*x) - (3*e^2*ArcTanh[Sqrt[d^2 - e^2*x^2]/d])/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.108883, antiderivative size = 80, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.185, Rules used = {1807, 807, 266, 63, 208} \[ -\frac{2 e \sqrt{d^2-e^2 x^2}}{d x}-\frac{\sqrt{d^2-e^2 x^2}}{2 x^2}-\frac{3 e^2 \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^2/(x^3*Sqrt[d^2 - e^2*x^2]),x]

[Out]

-Sqrt[d^2 - e^2*x^2]/(2*x^2) - (2*e*Sqrt[d^2 - e^2*x^2])/(d*x) - (3*e^2*ArcTanh[Sqrt[d^2 - e^2*x^2]/d])/(2*d)

Rule 1807

Int[(Pq_)*((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, c*x, x],
 R = PolynomialRemainder[Pq, c*x, x]}, Simp[(R*(c*x)^(m + 1)*(a + b*x^2)^(p + 1))/(a*c*(m + 1)), x] + Dist[1/(
a*c*(m + 1)), Int[(c*x)^(m + 1)*(a + b*x^2)^p*ExpandToSum[a*c*(m + 1)*Q - b*R*(m + 2*p + 3)*x, x], x], x]] /;
FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && LtQ[m, -1] && (IntegerQ[2*p] || NeQ[Expon[Pq, x], 1])

Rule 807

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> -Simp[((e*f - d*g
)*(d + e*x)^(m + 1)*(a + c*x^2)^(p + 1))/(2*(p + 1)*(c*d^2 + a*e^2)), x] + Dist[(c*d*f + a*e*g)/(c*d^2 + a*e^2
), Int[(d + e*x)^(m + 1)*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m, p}, x] && NeQ[c*d^2 + a*e^2, 0]
&& EqQ[Simplify[m + 2*p + 3], 0]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin{align*} \int \frac{(d+e x)^2}{x^3 \sqrt{d^2-e^2 x^2}} \, dx &=-\frac{\sqrt{d^2-e^2 x^2}}{2 x^2}-\frac{\int \frac{-4 d^3 e-3 d^2 e^2 x}{x^2 \sqrt{d^2-e^2 x^2}} \, dx}{2 d^2}\\ &=-\frac{\sqrt{d^2-e^2 x^2}}{2 x^2}-\frac{2 e \sqrt{d^2-e^2 x^2}}{d x}+\frac{1}{2} \left (3 e^2\right ) \int \frac{1}{x \sqrt{d^2-e^2 x^2}} \, dx\\ &=-\frac{\sqrt{d^2-e^2 x^2}}{2 x^2}-\frac{2 e \sqrt{d^2-e^2 x^2}}{d x}+\frac{1}{4} \left (3 e^2\right ) \operatorname{Subst}\left (\int \frac{1}{x \sqrt{d^2-e^2 x}} \, dx,x,x^2\right )\\ &=-\frac{\sqrt{d^2-e^2 x^2}}{2 x^2}-\frac{2 e \sqrt{d^2-e^2 x^2}}{d x}-\frac{3}{2} \operatorname{Subst}\left (\int \frac{1}{\frac{d^2}{e^2}-\frac{x^2}{e^2}} \, dx,x,\sqrt{d^2-e^2 x^2}\right )\\ &=-\frac{\sqrt{d^2-e^2 x^2}}{2 x^2}-\frac{2 e \sqrt{d^2-e^2 x^2}}{d x}-\frac{3 e^2 \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.271579, size = 122, normalized size = 1.52 \[ \frac{e \left (-\frac{4 d \sqrt{d^2-e^2 x^2}}{x}-2 d e \tanh ^{-1}\left (\frac{\sqrt{d^2-e^2 x^2}}{d}\right )-e \sqrt{d^2-e^2 x^2} \left (\frac{d^2}{e^2 x^2}+\frac{\tanh ^{-1}\left (\sqrt{1-\frac{e^2 x^2}{d^2}}\right )}{\sqrt{1-\frac{e^2 x^2}{d^2}}}\right )\right )}{2 d^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^2/(x^3*Sqrt[d^2 - e^2*x^2]),x]

[Out]

(e*((-4*d*Sqrt[d^2 - e^2*x^2])/x - 2*d*e*ArcTanh[Sqrt[d^2 - e^2*x^2]/d] - e*Sqrt[d^2 - e^2*x^2]*(d^2/(e^2*x^2)
 + ArcTanh[Sqrt[1 - (e^2*x^2)/d^2]]/Sqrt[1 - (e^2*x^2)/d^2])))/(2*d^2)

________________________________________________________________________________________

Maple [A]  time = 0.055, size = 86, normalized size = 1.1 \begin{align*} -{\frac{3\,{e}^{2}}{2}\ln \left ({\frac{1}{x} \left ( 2\,{d}^{2}+2\,\sqrt{{d}^{2}}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}} \right ) } \right ){\frac{1}{\sqrt{{d}^{2}}}}}-{\frac{1}{2\,{x}^{2}}\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}-2\,{\frac{e\sqrt{-{x}^{2}{e}^{2}+{d}^{2}}}{dx}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^2/x^3/(-e^2*x^2+d^2)^(1/2),x)

[Out]

-3/2*e^2/(d^2)^(1/2)*ln((2*d^2+2*(d^2)^(1/2)*(-e^2*x^2+d^2)^(1/2))/x)-1/2*(-e^2*x^2+d^2)^(1/2)/x^2-2*e*(-e^2*x
^2+d^2)^(1/2)/d/x

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/x^3/(-e^2*x^2+d^2)^(1/2),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.83799, size = 128, normalized size = 1.6 \begin{align*} \frac{3 \, e^{2} x^{2} \log \left (-\frac{d - \sqrt{-e^{2} x^{2} + d^{2}}}{x}\right ) - \sqrt{-e^{2} x^{2} + d^{2}}{\left (4 \, e x + d\right )}}{2 \, d x^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/x^3/(-e^2*x^2+d^2)^(1/2),x, algorithm="fricas")

[Out]

1/2*(3*e^2*x^2*log(-(d - sqrt(-e^2*x^2 + d^2))/x) - sqrt(-e^2*x^2 + d^2)*(4*e*x + d))/(d*x^2)

________________________________________________________________________________________

Sympy [C]  time = 5.45542, size = 224, normalized size = 2.8 \begin{align*} d^{2} \left (\begin{cases} - \frac{e \sqrt{\frac{d^{2}}{e^{2} x^{2}} - 1}}{2 d^{2} x} - \frac{e^{2} \operatorname{acosh}{\left (\frac{d}{e x} \right )}}{2 d^{3}} & \text{for}\: \frac{\left |{d^{2}}\right |}{\left |{e^{2}}\right | \left |{x^{2}}\right |} > 1 \\\frac{i}{2 e x^{3} \sqrt{- \frac{d^{2}}{e^{2} x^{2}} + 1}} - \frac{i e}{2 d^{2} x \sqrt{- \frac{d^{2}}{e^{2} x^{2}} + 1}} + \frac{i e^{2} \operatorname{asin}{\left (\frac{d}{e x} \right )}}{2 d^{3}} & \text{otherwise} \end{cases}\right ) + 2 d e \left (\begin{cases} - \frac{e \sqrt{\frac{d^{2}}{e^{2} x^{2}} - 1}}{d^{2}} & \text{for}\: \frac{\left |{d^{2}}\right |}{\left |{e^{2}}\right | \left |{x^{2}}\right |} > 1 \\- \frac{i e \sqrt{- \frac{d^{2}}{e^{2} x^{2}} + 1}}{d^{2}} & \text{otherwise} \end{cases}\right ) + e^{2} \left (\begin{cases} - \frac{\operatorname{acosh}{\left (\frac{d}{e x} \right )}}{d} & \text{for}\: \frac{\left |{d^{2}}\right |}{\left |{e^{2}}\right | \left |{x^{2}}\right |} > 1 \\\frac{i \operatorname{asin}{\left (\frac{d}{e x} \right )}}{d} & \text{otherwise} \end{cases}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**2/x**3/(-e**2*x**2+d**2)**(1/2),x)

[Out]

d**2*Piecewise((-e*sqrt(d**2/(e**2*x**2) - 1)/(2*d**2*x) - e**2*acosh(d/(e*x))/(2*d**3), Abs(d**2)/(Abs(e**2)*
Abs(x**2)) > 1), (I/(2*e*x**3*sqrt(-d**2/(e**2*x**2) + 1)) - I*e/(2*d**2*x*sqrt(-d**2/(e**2*x**2) + 1)) + I*e*
*2*asin(d/(e*x))/(2*d**3), True)) + 2*d*e*Piecewise((-e*sqrt(d**2/(e**2*x**2) - 1)/d**2, Abs(d**2)/(Abs(e**2)*
Abs(x**2)) > 1), (-I*e*sqrt(-d**2/(e**2*x**2) + 1)/d**2, True)) + e**2*Piecewise((-acosh(d/(e*x))/d, Abs(d**2)
/(Abs(e**2)*Abs(x**2)) > 1), (I*asin(d/(e*x))/d, True))

________________________________________________________________________________________

Giac [B]  time = 1.16385, size = 230, normalized size = 2.88 \begin{align*} -\frac{3 \, e^{2} \log \left (\frac{{\left | -2 \, d e - 2 \, \sqrt{-x^{2} e^{2} + d^{2}} e \right |} e^{\left (-2\right )}}{2 \,{\left | x \right |}}\right )}{2 \, d} + \frac{x^{2}{\left (\frac{8 \,{\left (d e + \sqrt{-x^{2} e^{2} + d^{2}} e\right )} e^{4}}{x} + e^{6}\right )}}{8 \,{\left (d e + \sqrt{-x^{2} e^{2} + d^{2}} e\right )}^{2} d} - \frac{{\left (\frac{8 \,{\left (d e + \sqrt{-x^{2} e^{2} + d^{2}} e\right )} d e^{8}}{x} + \frac{{\left (d e + \sqrt{-x^{2} e^{2} + d^{2}} e\right )}^{2} d e^{6}}{x^{2}}\right )} e^{\left (-8\right )}}{8 \, d^{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^2/x^3/(-e^2*x^2+d^2)^(1/2),x, algorithm="giac")

[Out]

-3/2*e^2*log(1/2*abs(-2*d*e - 2*sqrt(-x^2*e^2 + d^2)*e)*e^(-2)/abs(x))/d + 1/8*x^2*(8*(d*e + sqrt(-x^2*e^2 + d
^2)*e)*e^4/x + e^6)/((d*e + sqrt(-x^2*e^2 + d^2)*e)^2*d) - 1/8*(8*(d*e + sqrt(-x^2*e^2 + d^2)*e)*d*e^8/x + (d*
e + sqrt(-x^2*e^2 + d^2)*e)^2*d*e^6/x^2)*e^(-8)/d^2